package vek.XML.parsedObjects;

/**
 * Simple class to contain the POI data read by the XML parsers.
 * @see ParsedAttractions
 * @author Christian, Michal og Jakob (Hold 1, gruppe 2)
 */
public class ParsedPOI{
    
    public String name;
    public String type;
    public int coordinateX;
    public int coordinateY;
    public String poiicon1;
    public String poiicon2;
    public String lastUpdated;
    
    /**
     * 
     * @param n the name of the POI
     * @param t the type of the POI
     * @param cordX the X coordinate of the POI, used to determine its location on the map
     * @param cordY the Y coordinate of the POI, used to determine its location on the map
     * @param ico1 the poi icon when not pressed
     * @param ico2 the poi icon when pressed
     * @param lastU the date when the poi XML file was last updated
     */
    
    public ParsedPOI(String n, String t, int cordX, int cordY, String ico1, String ico2, String lastU)
    {
        name = n;
        type = t;
        coordinateX = cordX;
        coordinateY = cordY;
        poiicon1 = ico1;
        poiicon2 = ico2;
        lastUpdated = lastU;
    }
    
    /**
     * This constructor takes a ParsedPOI object, gets the values of the variables,
     * and then sets its own variables to the variables of the specified ParsedPOI object.
     * This method is used to that classes that extend this class can delegate
     * the responsibility of assining the POI variables to this class.
     * @param ppoi a ParsedPOI object which contains data which this object should have
     */
    
    public ParsedPOI(ParsedPOI ppoi)
    {
        name = ppoi.name;
        type = ppoi.type;
        coordinateX = ppoi.coordinateX;
        coordinateY = ppoi.coordinateY;
        poiicon1 = ppoi.poiicon1;
        poiicon2 = ppoi.poiicon2;
        lastUpdated = ppoi.lastUpdated;
    }
    
    /**
     * Gets this object as a String
     * @return this object as a String
     */
    
    public String toString()
    {
        return "name: " + name + " type: " + type + " cordX: " + coordinateX + " cordY " + coordinateY;
    }
    
    

}
